Advanced Lane Finding Project

The goals / steps of this project are the following:

Camera calibration

Camera resectioning determines which incoming light is associated with each pixel on the resulting image.

Distortion correction

Image distortion occurs when a camera looks at 3D objects in the real world and transforms them into a 2D image; this transformation isn’t perfect. Distortion actually changes what the shape and size of these 3D objects appear to be. So, the first step in analyzing camera images, is to undo this distortion so that you can get correct and useful information out of them.

Perspective transformation

A perspective transform maps the points in a given image to different, desired, image points with a new perspective. The perspective transform you’ll be most interested in is a bird’s-eye view transform that let’s us view a lane from above; this will be useful for calculating the lane curvature later on. Aside from creating a bird’s eye view representation of an image, a perspective transform can also be used for all kinds of different view points.

Test warped images with differnt colour spaces

Four different colour spaces were used to test warped images.

Here we have to detect two major colors such that yellow and white from raw images. LAB color space B was perfomed well to detect yellow lane lines from the roads images. For white lane lines, we have few options to select color channels. HLS L was perfomed well to detect white lane lines from road images.

Gradient threshold

When we are detecting edges from road images, there are ohter edges will be detected with Canny edge detection. We have to minimize those unnecessary edge detections. One of the improved version of Canny edge detection is Sobel operator[Wikipedia]. Applying the Sobel operator to an image is a way of taking the derivative of the image in the x or y direction.

Sobel absolute threshold

Apply Sobel absolute threshold for selected color channels

Apply Sobel absolute filter for HLS L color channel
Apply Sobel absolute filter for LAB B color channel

Sobel magnitude of the gradient

Apply sobel magnitude filter
Applying HLS L color channel for sobel magnitude
Applying LAB B color channel for sobel magnitude

Sobel direction of the gradient

Apply sobel direction filter
Applying HLS L color channel for sobel gradient

Combine sobel magnitude and direction gradients

Apply sobel combine filter
Applying HLS L color channel for combine filer
Applying LAB B color channel for combine filter

Normalize color channels

HLS L channel and LAB B was perfomed well to detect yellow and white lane lines, now we can nomalize both color channels to smooth edges.

Pipeline

Test pipeline for test images

Histogram Peaks

Implement sliding windows and fit a polynomial

Polyfit using previous frame windows

Radius of curvature and distance from center calculation

Draw curvature radius and distance from center data onto a original image